<!doctype html>
<html lang="zh-hans">
<head>
    <title>汇聚有趣生活的记录者</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1,user-scalable=no,maximum-scale=1″">
    <meta http-equiv="Access-Control-Allow-Origin" content="*">
    <script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
    <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.js"></script>
    <script src="http://static.geetest.com/static/tools/gt.js"></script>
    <script>
        function browserRedirect() {
            var browser = {
                versions: function () {
                    var u = navigator.userAgent, app = navigator.appVersion;
                    return {
                        trident: u.indexOf('Trident') > -1, //IE内核
                        presto: u.indexOf('Presto') > -1, //opera内核
                        webKit: u.indexOf('AppleWebKit') > -1, //苹果、谷歌内核
                        gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1, //火狐内核
                        mobile: u.indexOf('Mobile') > -1,
                        apple: u.match(/AppleWebKit/), //是否为移动终端
                        ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios终端
                        android: u.indexOf('Android') > -1, //android终端
                        uc: u.indexOf('Linux') > -1, //或者uc浏览器
                        iPhone: u.indexOf('iPhone') > -1,//是否为iPhone
                        mac: u.indexOf('QQ') > -1, //或者QQHD浏览器
                        iPad: u.indexOf('iPad') > -1, //是否iPad
                        webApp: u.indexOf('Safari') == -1 //是否web应该程序，没有头部与底部
                    }
                }()
            };
            if (browser.versions.iPad) {
                location.href = "http://www.mizhimedia.com";
            } else if(!browser.versions.android && !browser.versions.iPhone && !browser.versions.mobile) {
                if(location.href.indexOf("FilmDetail") > -1
                    || location.href.indexOf("CampaignDetail")>-1
                    || location.href.indexOf("DemandDetail")>-1){
                    var str =location.href;
                    console.log("str=============",str);
                    var url = str.replace("wap.mizhimedia.com","www.mizhimedia.com");
                    location.href = url;
                } else {
                    location.href = "http://www.mizhimedia.com";
                }
            }
        }
        browserRedirect();
    </script>
</head>
<body>
    <div id="Payegis"></div>
    <script src="//cdn.bootcss.com/jquery/2.0.0/jquery.min.js"></script>
    <script src="//cdn.bootcss.com/jquery.nicescroll/3.6.7/jquery.nicescroll.min.js"></script>
    <script src="http://video.mizhimedia.com/chplayer_h5/chplayer.min.js"></script>
    <script type="text/javascript">
        var imgUrl ="http://www.mizhimedia.com:9091/image/test-logo.png";//这里是分享的时候的那个图片
        var lineLink ="http://baidu.com";//这个是分享的网址
        var descContent = "这个操作的介绍，没发现他有啥用";
        var shareTitle ="这是题目题目题目";
        var appid ="";  //这里写开发者接口里的appid
        function shareFriend() {
            WeixinJSBridge.invoke("sendAppMessage",{
                "appid": appid,
                "img_url": imgUrl,
                "img_width": "640",
                "img_height": "640",
                "link": lineLink,
                "desc": descContent,
                "title": shareTitle
            }, function(res) {
                _report("send_msg", res.err_msg);
            })
        }
        function shareTimeline() {
            WeixinJSBridge.invoke("shareTimeline",{
                "img_url": imgUrl,
                "img_width": "640",
                "img_height": "640",
                "link": lineLink,
                "desc": descContent,
                "title": shareTitle
            }, function(res) {
                _report("timeline", res.err_msg);
            });
        }
        // 当微信内置浏览器完成内部初始化后会触发WeixinJSBridgeReady事件。
        document.addEventListener("WeixinJSBridgeReady", function onBridgeReady() {
            // 发送给好友
            WeixinJSBridge.on("menu:share:appmessage", function(argv){
                shareFriend();
            });
            // 分享到朋友圈
            WeixinJSBridge.on("menu:share:timeline", function(argv){
                shareTimeline();
            });
        }, false);
    </script>
    <script type="text/javascript">
        var _mtac = {};
        (function() {
            var mta = document.createElement("script");
            mta.src = "http://pingjs.qq.com/h5/stats.js?v2.0.4";
            mta.setAttribute("name", "MTAH5");
            mta.setAttribute("sid", "500534183");
            mta.setAttribute("cid", "500537927");
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(mta, s);
        })();
    </script>
</body>
</html>